package com.huowenjie.api;

import com.github.pagehelper.PageInfo;
import com.huowenjie.entity.Dan;
import com.huowenjie.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

//@FeignClient(name = "eureka-client01",fallback = TestFall.class)
@FeignClient(name = "eureka-client01")
public interface TestApi {

    @RequestMapping("list")
    public List<Dan> list();

    @RequestMapping("userList")
    public PageInfo<User> userList(@RequestParam("pageNum")Integer pageNum);

    @RequestMapping("register")
    public String register(@RequestBody User user);

    @RequestMapping("login")
    public String login(@RequestBody User user);

}
